import numpy as np
import pandas as pd
import model
import preprocessingfile

weight = model.load_model('model_500000.npy')
x_test = preprocessingfile.preprocessor_test_data('data/test/test.csv')
y_test_pred = np.dot(x_test, weight)
print(y_test_pred)
y_test_pred_df = pd.DataFrame(y_test_pred, columns=['label'])
y_test_pred_df['id'] = range(0, len(y_test_pred_df))
y_test_pred_df = y_test_pred_df[['id', 'label']]
# 保存到 predict.csv 文件中
y_test_pred_df.to_csv('data/predict/predict.csv', index=False)
